<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'category-form',
	'enableAjaxValidation'=>true,
)); ?>

	<?php echo Yii::t('admin','<p class="note">Fields with <span class="required">*</span> are required.</p>');?>	

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
			<?php echo $form->labelEx($model,'cate_name'); ?>
			<?php echo $form->textField($model,'cate_name',array('size'=>50,'maxlength'=>50)); ?>
			<?php echo $form->error($model,'cate_name'); ?>
	</div>

	<div class="row">
			<?php echo $form->labelEx($model,'cate_link'); ?>
			<?php echo $form->textField($model,'cate_link',array('size'=>60,'maxlength'=>500)); ?>
			<?php echo $form->error($model,'cate_link'); ?>
	</div>
	
	<div class="row left column3">
		<?php echo $form->labelEx($model,'cate_type'); ?>
		<?php echo $form->dropDownList($model,'cate_type',
				Category::model()->generateCategoryDropdownListArray(),array(
							'options'=>array($model->cate_type=>array('selected'=>true)),
//							'style'=>'width:100%;'
		)); ?>
		<?php echo $form->error($model,'cate_type'); ?>
	</div>
	<div class="row left column3">
		<?php echo $form->labelEx($model,'cate_pid'); ?>
		<?php $dropdownlist = Category::model()->getCategoryDropdownList(Category::CATEGORY_NEWS);?>
		<?php echo $form->dropDownList($model,'cate_pid',$dropdownlist,array(
				'options'=>array($model->cate_pid=>array('selected'=>true)),
	//			'style'=>'width:100%;'											
		)); ?>	
			
		<?php echo $form->error($model,'cate_pid'); ?>
	</div>		
	<div class="clear"></div>

		
	<div class="row column3">
			<?php echo $form->labelEx($model,'cate_contype'); ?>
			<?php echo $form->dropDownList($model,'cate_contype',Category::model()->generateContentTypeDropdownListArray()); ?>
			<?php echo $form->error($model,'cate_contype'); ?>
	</div>	
	<div class="row column3">
			<?php echo $form->labelEx($model,'cate_recommend'); ?>
			<?php echo $form->dropDownList($model,'cate_recommend',Category::model()->generateCategoryRecommendDropdownListArray()); ?>
			<?php echo $form->error($model,'cate_recommend'); ?>
	</div>
	<div class="row column3">
		<?php echo $form->labelEx($model,'cate_order'); ?>
		<?php echo $form->textField($model,'cate_order'); ?>
		<?php echo $form->error($model,'cate_order'); ?>
	</div>	
	<div class="clear"></div>
	



	<div class="row">
		<?php echo $form->labelEx($model,'cate_des'); ?>
		<?php echo $form->textArea($model,'cate_des',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'cate_des'); ?>
	</div>	

	<div class="row buttons">
	   <button type="button" id="cate_submit" onclick="categoryCreate();"><?php echo $model->isNewRecord?'Create':'Save'; ?></button>
	</div>	


<?php $this->endWidget(); ?>

</div><!-- form -->